<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>无限拉群</title>
	<link rel="stylesheet" href="/layui/css/layui.css">
	<link rel="stylesheet" href="/hyqcss/public.css">
	<style type="text/css">
		body{
			background: #e9e9e9;
		}
		/*公共头部带搜索*/
		.public_container{
			margin: 20px;
			background: #fff;
		}
		.public_title_container{
			height: 54px;
			padding: 0 20px;
			font-size: 14px;
			display: flex; 
			align-items: center;
			background: #f9f9f9;
			border-bottom: 1px solid #f0f0f0;
		}
		.public_buttonSearch_container{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 20px;
			background: #fff;
		}
		.public_buttonSearch_container a{
			color: #fff;
			background-color: #1E9FFF;
			text-shadow: 0 -1px 0 rgba(0,0,0,.12);
			height: 24px;
			padding: 4px 15px;
			font-size: 14px;
			border-radius: 2px;
			display: flex;
			align-items: center;
		}
		.public_Search_container{
			position: relative;
		}
		.public_Search_container input{
			width: 240px;
			height: 32px;
			border: 1px solid #d9d9d9;
		}
		.public_Search_container i{
			position: absolute;
			bottom: 6px;
			right: 10px;
			cursor: pointer;
		}
		.chat-li {
		    margin-bottom: 8px;
		    display: -webkit-box;
		    display: flex;
		    -webkit-box-align: center;
		    align-items: center;
		    box-sizing: border-box;
		}
		.chat-info>img {
		    width: 30px;
		    height: 30px;
		    margin-right: 7px;
		}
		.chat-status.red {
		    background: #fbe3e2;
		    border: 1px solid #ffb4b4;
		}
		.chat-status.green {
		    background: #e8fcdc;
		    border: 1px solid #a1ec9f;
		}
		.chat-status.gray {
		    background: #f2f2f2;
		    border: 1px solid #d1d1d1;
		}
		.chat-status {
		    width: 58px;
		    height: 22px;
		    font-size: 12px;
		    line-height: 22px;
		    color: rgba(0,0,0,.65);
		    text-align: center;
		    border-radius: 2px;
		    margin-left: 16px;
		    word-break: keep-all;
		    white-space: nowrap;
		}
		.chat-info {
		    width: 160px;
		    height: 38px;
		    padding: 12px 13px;
		    background: #fff;
		    border: 1px solid #e6e6e6;
		    box-sizing: border-box;
		    border-radius: 2px;
		    display: -webkit-box;
		    display: flex;
		    -webkit-box-align: center;
		    align-items: center;
		}
	 	.chat-list-wrap {
    		max-height: 90px;
		}
	</style>
</head>
<body>
		<!-- 顶部提示框 开始 -->
	<div class="public_tipSetting_contaienr">
		<div class="public_tipSetting_content">
			<p>企业无需创建群即可开始拉群任务，客户扫码不用添加企业成员即可入群，简化客户入群流程，增加客户入群率，方便企业管理。</p>
			<a href="#" >查看教程</a>
			<svg t="1599462804099" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8813" width="15" height="15"><path d="M512 102.4a409.6 409.6 0 1 0 409.6 409.6 409.6 409.6 0 0 0-409.6-409.6z m181.248 518.144a51.2 51.2 0 0 1-72.704 72.704L512 584.192l-108.544 109.056a51.2 51.2 0 0 1-72.704-72.704L439.808 512 330.752 403.456a51.2 51.2 0 0 1 72.704-72.704L512 439.808l108.544-109.056a51.2 51.2 0 0 1 72.704 72.704L584.192 512z" fill="" p-id="8814"></path></svg>
		</div>
	</div>
	<!-- 顶部提示框 结束 -->
	<div class="public_container">
		<!-- /*公共头部带搜索*/ -->
		<div class="public_content">
			<div class="public_title_container">
				<p>无限拉群</p>
			</div>
			<div class="public_buttonSearch_container">
				<a href="add_infinite_group.html">+ 新建拉群</a>
				<form  method="get" action="" id="Form1">
				<div class="public_Search_container">
					<input type="text" name="name" value="{$name}" required  lay-verify="required" placeholder="搜索群活码名称" autocomplete="off" class="layui-input">
					<i class="layui-icon layui-icon-search" onclick="document.getElementById('Form1').submit()"></i>
				</div>
				</form>
			</div>
		</div>
		<!-- /*公共头部带搜索*/ end -->
		<!-- 公共表格部分 -->
		<div class="public_table_container">
			<table class="layui-table" lay-skin="line">
			    <thead>
			      <tr>
			        <th>二维码</th>
			        <th>名称</th>
			        <th>创建时间</th>
			        <th>扫码人数</th>
			        <th>群聊</th>
			        <th>操作</th>
			      </tr> 
			    </thead>
			    <tbody>
				{loop $list as $r}
			      <tr>
			        <td><img style="width: 100px;height: 100px;" src="{$r['url']}"></td>
			        <td>{$r['name']}</td>
			        <td>{$r['ctime']}</td>
			        <td>{$r['size']?:0;}</td>
			        <td>
			        	<div class="chat-list-wrap ">
				        	<ul class="chat-list" data-chat="index">
				        		{loop $r["data"] as $key=>$data}
				        		<li class="chat-li">
				        			<div class="chat-info">
				        				<img src="{$data['qr_code']}"> 
				        				<span class="chat-name">群活码{$data['orders']}</span>
				        			</div>
				        			{if $data["status"] == 1}
				        				<div class="chat-status green">拉人中</div>
				        			{else if $data["status"] == 2}
				        				<div class="chat-status red">已达上限</div>
				        			{else if $data["status"] == 3}
				        				<div class="chat-status gray">未开启</div>
				        			{/if}
				        		</li>
				        		{/loop}
				        	</ul>
			        	</div>
			        <td>
					<a type="button" class="table-public-btn" onclick="particulars({$r['id']})">详情</a>
					<a class="table-public-btn" href="add_infinite_group-{$r['id']}.html">编辑</a>
					<a class="table-public-btn" target="_blank" href="download_qrcode-{$r['id']}.html">下载</a>
					<a type="button" class="table-public-btn" onclick="del_group({$r['id']})">删除</a>
					</td>
			      </tr>
				{/loop}
			    </tbody>
			</table>
		</div>
		<!-- 公共表格部分 end-->
		<div class="main-container-h pageing-container-h">
		        <div class="pageing-content-h">
		           <span>{$p->totalnum}条/{$p->totalpage}页</span> 
		        </div>
				<ul class="pageing-content-h">
		           {P weidogsadmin}
				</ul>
		    </div>
	</div>
	
<script src="/cdn/jquery.js"></script>
<script src="/layui/layui.js"></script>
<script src="/js/ajax.js"></script>
<script type="text/javascript">
layui.use(['element', 'layer', 'form'], function () {

})
$('.public_tipSetting_contaienr svg').click(function(){
	$('.public_tipSetting_contaienr').hide();
})

function del_group(id){
	myAjaxPost(false, true, 'del_group.html', { id:id}, function (resp) {
		tusi(resp.msg);
		if(resp.status == "success"){
			setTimeout(function(){
				location.reload();
			},1000);
		}
	});
}
function particulars(id){
	layer.open({
        type: 2,
        title: '请选择使用人员',
        shadeClose: true,
        shade: 0.2,
        area: ['650px', '450px'],
        content: 'particulars-'+id+'.html'
  	}); 
}
</script>
</body>
</html>